Skip to content

GH-40: Add MapVector usage example - #1475

Open
yashdotdev13 wants to merge 1 commit into
apache:mainfrom
yashdotdev13:docs/40-mapvector-example
Open

yashdotdev13 wants to merge 1 commit into
apache:mainfrom
yashdotdev13:docs/40-mapvector-example

Conversation

@yashdotdev13

@yashdotdev13 yashdotdev13 commented Nov 14, 2026 •

Copy link
Copy Markdown

Summary

Add a MapVector usage example to the Apache Arrow Java documentation.

This contribution complements the Java Cookbook example in [apache/arrow-cookbook#419](apache/arrow-cookbook#419) by providing a corresponding example directly in the Arrow Java documentation.

The example demonstrates:

  • Creating and initializing a MapVector.
  • Writing key-value entries using UnionMapWriter.
  • Reading map entries using UnionMapReader.
  • Working with BIGINT keys and INT values.

@yashdotdev13 yashdotdev13 changed the title docs: Add MapVector usage example GH-40: Add MapVector usage example Nov 14, 2026
@yashdotdev13

Copy link
Copy Markdown
Author

Hi maintainers,

The PR is a documentation-only contribution. The required PR-format check is asking for a label.

Could someone with repository permissions please apply the documentation label so the checks can proceed?

Thanks!

@lidavidm

Copy link
Copy Markdown
Member

git diff --check passed.

This is not a test.

Sphinx HTML documentation build: [report result after running the build].

Were the docs built?

Additionally, the original issue refers to the Cookbook, which is at https://github.com/apache/arrow-cookbook.

@yashdotdev13

Copy link
Copy Markdown
Author

Hi @lidavidm,

Thanks for the feedback and for pointing me toward the Apache Arrow Cookbook!

I've followed your suggestion and created a new PR in apache/arrow-cookbook:

New PR: apache/arrow-cookbook#419

The new PR adds an Array of Map recipe to the Java Cookbook, demonstrating:

  • Creating a MapVector with BIGINT keys and INT values.
  • Writing key-value entries using UnionMapWriter.
  • Reading map entries using UnionMapReader.
  • Verifying the expected output with the Cookbook's testcode and testoutput directives.

I have also completed the requested validation:

  • git diff --check — passed.
  • make javatest — 52 tests passed, 0 failures.
  • make java — Sphinx HTML documentation build succeeded.

The Cookbook contribution is now submitted for review.

Thanks again for the guidance!

@jbonofre
jbonofre self-requested a review November 18, 2026 10:19

@jbonofre jbonofre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, having a Building MapVector section directly alongside Building ListVector in docs/source/vector.rst is useful and complements the apache/arrow-cookbook#419.

@lidavidm are you OK with landing this in arrow-java docs in addition to apache/arrow-cookbook#419?

@jbonofre

jbonofre commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Basically, I think this PR still makes sense in complement of the cookbook.

@lidavidm

Copy link
Copy Markdown
Member

Sure, the author never updated the PR description, though

@jbonofre jbonofre added the documentation PRs that improve documentation. label Nov 18, 2026
@apache apache deleted a comment from github-actions Bot Nov 18, 2026
@jbonofre

Copy link
Copy Markdown
Member

@lidavidm fair.

@yashdotdev13 do you mind to update the description accordingly? Thanks!

@github-actions github-actions Bot added this to the 20.0.0 milestone Nov 18, 2026
@yashdotdev13

Copy link
Copy Markdown
Author

Hi @jbonofre,

Thanks for the review and approval!
I've updated the PR description to clarify how this Java documentation example complements the Cookbook contribution in apache/arrow-cookbook#419.
I agree that having the example available in both places provides value to developers.

Thanks for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation PRs that improve documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants